package com.jasonzqshen.ifm.collections.treeCollection.factories;

import org.w3c.dom.Element;

import com.jasonzqshen.ifm.collections.treeCollection.*;
import com.jasonzqshen.ifm.utils.*;


public abstract class TreeObjectFactory {
    private String treeObjectClassName;

    private TreeBasicType basicType;

    /**
     * 
     */
    public abstract TreeObject constructNewInstance(Identifier id, Object[] args);

    /**
     * public delegate void TreeXmlParse(XElement xelem, Tree tree);
     */
    public abstract void xmlParser(Element elem, TreeObject treeObject);

    public TreeObjectFactory(String treeObjectClassName, TreeBasicType basicType) {
        this.treeObjectClassName = treeObjectClassName;
        this.basicType = basicType;
    }

    /**
     * Get Tree Object Type
     * 
     * @return
     */
    public final String getTreeClassName() {
        return this.treeObjectClassName;
    }

    /**
     * Get basic type
     * 
     * @return
     */
    public final TreeBasicType getBasicType() {
        return this.basicType;
    }
}
